package cn.sns.sample;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class RegTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		String patternString = "/home/\\?uid=(\\d+)";
		Pattern pattern = Pattern.compile(patternString,
				Pattern.CASE_INSENSITIVE);
		Matcher matcher = pattern.matcher("/home/?uid=1234");
		if(matcher.find()){
			System.out.println(matcher.group(1));
		}

	}

}
